package day08;

public class HW2 {
    public static void main(String[] args) { 
        
        int[] arr1 = {1,2,3}; 

            /*for (int num : arr1){ 
                 num = 4;   //不改变数组的值
            } */

             for (int i = 0; i < arr1.length; i++) {
                 arr1[i] = 4; // 直接修改数组元素
            }   

        System.out.println("输出：" + arr1[0]); 
    } 
}
